
package todolist.personalization;

import todolist.entity.PriorityType;

/**
 * Controls application behaviour related to Task Priority input and display.
 * Singleton class.
 * Currently allows getting only, may allow reading/setting/writing in the future.
 * @author Ivan
 */
public class PriorityCustomizer {

	// handle singleton instance

	private static PriorityCustomizer _objPC;

	public static PriorityCustomizer getInstance() {
		if (_objPC == null)
			_objPC = new PriorityCustomizer();
		return _objPC;
	}

	// input Priority Type

	private static final String[] PRIORITY_INPUT_HIGH = {
		"highest", "higher", "important", "impt", "urgent", "++"};
	private static final String[] PRIORITY_INPUT_MID = {
		"medium", "middle", "none", "nil", "null", "na", "n.a.", "=="};
	private static final String[] PRIORITY_INPUT_LOW = {
		"lowest", "lower", "unimportant", "unimpt", "--"};
	
	// display Priority Type
	
	private static final String PRIORITY_DISPLAY_HIGH = "HIGH";
	private static final String PRIORITY_DISPLAY_MID = "MID";
	private static final String PRIORITY_DISPLAY_LOW = "LOW";

	/**
	 * Default priority when Task is created.
	 */
	public PriorityType getDefaultPriorityType() {
		return PriorityType.PRIORITY_MID;
	}
	
	// input Priority Type

	/**
	 * Returns all keywords that denote High Priority.
	 */
	public String[] getInputHighPriority() {
		return PRIORITY_INPUT_HIGH;
	}
	
	/**
	 * Returns all keywords that denote Mid Priority.
	 */
	public String[] getInputMidPriority() {
		return PRIORITY_INPUT_MID;
	}
	
	/**
	 * Returns all keywords that denote Low Priority.
	 */
	public String[] getInputLowPriority() {
		return PRIORITY_INPUT_LOW;
	}
	
	// display Priority Type
	
	/**
	 * High Priority display descriptor.
	 */
	public String getDisplayHighPriority() {
		return PRIORITY_DISPLAY_HIGH;
	}

	/**
	 * Mid Priority display descriptor.
	 */
	public String getDisplayMidPriority() {
		return PRIORITY_DISPLAY_MID;
	}

	/**
	 * Low Priority display descriptor.
	 */
	public String getDisplayLowPriority() {
		return PRIORITY_DISPLAY_LOW;
	}

}
